package com.ruoyi.kycinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kycinfo.mapper.KycPerfectionMapper;
import com.ruoyi.kycinfo.domain.KycPerfection;
import com.ruoyi.kycinfo.service.IKycPerfectionService;

/**
 * 完善度信息Service业务层处理
 * 
 * @author wzk
 * @date 2023-10-10
 */
@Service
public class KycPerfectionServiceImpl implements IKycPerfectionService 
{
    @Autowired
    private KycPerfectionMapper kycPerfectionMapper;

    /**
     * 查询完善度信息
     * 
     * @param perfectionId 完善度信息主键
     * @return 完善度信息
     */
    @Override
    public KycPerfection selectKycPerfectionByPerfectionId(Long perfectionId)
    {
        return kycPerfectionMapper.selectKycPerfectionByPerfectionId(perfectionId);
    }

    /**
     * 查询完善度信息列表
     * 
     * @param kycPerfection 完善度信息
     * @return 完善度信息
     */
    @Override
    public List<KycPerfection> selectKycPerfectionList(KycPerfection kycPerfection)
    {
        return kycPerfectionMapper.selectKycPerfectionList(kycPerfection);
    }

    /**
     * 新增完善度信息
     * 
     * @param kycPerfection 完善度信息
     * @return 结果
     */
    @Override
    public int insertKycPerfection(KycPerfection kycPerfection)
    {
        kycPerfection.setCreateTime(DateUtils.getNowDate());
        return kycPerfectionMapper.insertKycPerfection(kycPerfection);
    }

    /**
     * 修改完善度信息
     * 
     * @param kycPerfection 完善度信息
     * @return 结果
     */
    @Override
    public int updateKycPerfection(KycPerfection kycPerfection)
    {
        kycPerfection.setUpdateTime(DateUtils.getNowDate());
        return kycPerfectionMapper.updateKycPerfection(kycPerfection);
    }

    /**
     * 批量删除完善度信息
     * 
     * @param perfectionIds 需要删除的完善度信息主键
     * @return 结果
     */
    @Override
    public int deleteKycPerfectionByPerfectionIds(Long[] perfectionIds)
    {
        return kycPerfectionMapper.deleteKycPerfectionByPerfectionIds(perfectionIds);
    }

    /**
     * 删除完善度信息信息
     * 
     * @param perfectionId 完善度信息主键
     * @return 结果
     */
    @Override
    public int deleteKycPerfectionByPerfectionId(Long perfectionId)
    {
        return kycPerfectionMapper.deleteKycPerfectionByPerfectionId(perfectionId);
    }
}
